package top.zhan.singleton;

/**
 * 单例设计模式 饿汉方案
 * @author Zhan
 * @date 2022/9/26 17:14
 */
public class SingletonHungry {
    private static final SingletonHungry instance = new SingletonHungry();

    private SingletonHungry(){}

    public void process(){
        System.out.println("方法调用成功");
    }

    public static SingletonHungry getInstance(){
        return instance;
    }
}
